<template>
    <p >{{翻转}}</p>
    <input type="button" value="翻转" @click="reverse">
</template>
<script>
  import {ref} from "vue"
  export default {
    name: 'App',
    setup(){
    const re = ref('hello,world!')
    const reverse = () =>{ 
        re.value = re.value.split('').reverse().join('');
    }
     return {re,reverse}
  }
}
  </script>